package com.qgs.waf.jedis;

import java.text.SimpleDateFormat;

@SuppressWarnings("unused")
public class RedisKeys {
	private static final SimpleDateFormat SDFWITHTIME = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	private static final SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd");
	private static final SimpleDateFormat SDFOrdinary = new SimpleDateFormat("yyyyMMdd");
	/**
	 * 攻击总数
	 */
	public static final String SA = "statistics.attacks";
	/**
	 * 攻击展示
	 */
	public static final String ASS = "statistics.attacks.sourceip";
	/**
	 * 攻击列表
	 */
	public static final String ASL = "statistics.attacks.list";
	/**
	 * 网站省份关联
	 */
	public static final String ATTACKSUMMARYPROVINCERELATION = "attack.summary.province.relation";
	/**
	 * 网站行业关联
	 */
	public static final String ATTACKSUMMARYINDUSTROYRELATION = "attack.summary.industroy.relation";
	/**
	 * 攻击汇总列表
	 */
	public static final String ATTACKSUMMARY = "attack.summary";
	/**
	 * 客户列表
	 */
	public static final String ATTACKSUMMARYRELATIONCUSTOMER = "attack.summary.relation.customer";

	/**
	 * @show 获取列表key
	 * @param date
	 * @return
	 */
	public static String getAttackSummaryKey(String date) {
		return ATTACKSUMMARY + "." + date;
	}

	/**
	 * @show 获取客户列表key
	 * @param date
	 * @return
	 */
	public static String getAttackSummaryByCustomerKey(String customer) {
		return ATTACKSUMMARY + ".customer." + customer;
	}

	/**
	 * @show 格式化时间
	 * @param date
	 * @return
	 */
	public static String getDataOrdinary(java.util.Date data) {
		return SDFOrdinary.format(data);
	}
}